From 733a590fbedb57f67dca1c8a690077f315e5fe6c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 28 Jun 2014 10:56:54 -0400 Subject: [PATCH] GtkButton: warn slightly less Use gtk_misc_set_alignment when setting x/align on button children where possible, to avoid the runtime warning that g_object_set incurs nowadays. --- gtk/gtkbutton.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 77143f241b..5a9e4e9aca 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -702,7 +702,9 @@ maybe_set_alignment (GtkButton *button, return; G_GNUC_BEGIN_IGNORE_DEPRECATIONS - if (GTK_IS_MISC (widget) || GTK_IS_ALIGNMENT (widget)) + if (GTK_IS_MISC (widget)) + gtk_misc_set_alignment (GTK_MISC (widget), priv->xalign, priv->yalign); + else if (GTK_IS_ALIGNMENT (widget)) g_object_set (widget, "xalign", priv->xalign, "yalign", priv->yalign, NULL); G_GNUC_END_IGNORE_DEPRECATIONS } -- 2.30.2